﻿package models
import (
	"log"
	"database/sql"
	_ "github.com/go-sql-driver/mysql"
)

var DBO *sql.DB 
func init(){
	var err error
	DBO, err = sql.Open("mysql", "user1:user123@tcp(203.195.196.119:3306)/stock_user")
	if err != nil {
		log.Println(err)
		log.Fatal("Connection to database failed.")
	}
	log.Println("Database connected.")
}